home *** CD-ROM | disk | FTP | other *** search
- Path: linus.mitre.org!usenet
- From: James Roy <jroy@mitre.org>
- Newsgroups: comp.lang.c++
- Subject: Spawning a DOS command to Label a Diskette
- Date: 16 Apr 1996 16:44:54 GMT
- Organization: The MITRE Corp.
- Message-ID: <4l0iq6$ktc@linus.mitre.org>
- NNTP-Posting-Host: jroy.mitre.org
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.12(Macintosh; I; 68K)
- X-URL: news:comp.lang.c++
-
- Hello,
- I am using the the WinExec command to label a diskette and am
- experiencing different difficulties when run under Windows 95. The code
- is as follows:
-
- sprintf(tmp,"dosprompt.pif /c Label %s%s-%1d",drive,name,disk);
- err = WinExec(tmp,SW_MINIMIZED) <= 32;
-
- the code executes as expected in 3.1 and in 95 when my application is
- linked dynamicly (aside from and annoying momentary blanking of the
- screen), but when linked staticly it dies at this point in Windows 95.
-
- The application is a Borland C++ 4.52 AppExpert generated application
- targetted for a Windows 16 environment.
-
- Is there a more elegent way to Label a diskette from a Windows
- application than spawning DOS? If not, how can the annoying screen
- blanking be eliminated? At the least, does anyone have a suggestion as
- to why it hangs in Windows 95?
-
- Thank you
- Jim
- jroy@mitre.org
-
-
-